package com.cafuc.base;

import java.util.ArrayList;
import java.util.List;

public class JavaBase {

    private int id;
    private String name;
    public static List<String> aaa  = new ArrayList<>();
    public final static int STATUS_CODE = 1;

    static {
        aaa.add("sjy");
        aaa.add("sss");
    }

    public JavaBase() {
    }

    public JavaBase(int id, String name) {
        this.id = id;
        this.name = name;
    }

    public void call() {
        System.out.println("hello");
        for (int i = 0; i < aaa.size(); i ++) {
            System.out.println(aaa.get(i));
        }
        for (String item : aaa) {
            System.out.println(item);
        }
        aaa.stream().forEach(item -> {
            System.out.println(item);
        });
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public class Person {
        private String name;
        public void display() {
            System.out.println("111111111");
        }
    }

    public static void main(String[] args) {
        JavaBase javaBase = new JavaBase(1, "sun");
        javaBase.call();
        System.out.println(JavaBase.aaa);
        Person person = javaBase.new Person();
        person.display();

    }
}
